<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
 <meta>
  <!-- Stylesheets -->
  <link href="../web.css" type="text/css" rel="stylesheet"></link>
  <link href="../pygmentize.css" type="text/css" rel="stylesheet"></link>
  <title>VLFeat - Documentation - C API</title>
  <link rel="stylesheet" type="text/css" href="../doxygen.css"></style>

  <!-- Scripts-->
  
 </meta>

 <!-- Body Start -->
 <body>
  <div id="header">
   <!-- Google CSE Search Box Begins -->
   <form action="http://www.vlfeat.org/search.html" method="get" id="cse-search-box" enctype="application/x-www-form-urlencoded">
    <div>
     <input type="hidden" name="cx" value="003215582122030917471:oq23albfeam"></input>
     <input type="hidden" name="cof" value="FORID:11"></input>
     <input type="hidden" name="ie" value="UTF-8"></input>
     <input type="text" name="q" size="31"></input>
     <input type="submit" name="sa" value="Search"></input>
    </div>
   </form>
   <script src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en" xml:space="preserve" type="text/javascript"></script>
   <!-- Google CSE Search Box Ends -->
   <h1><a shape="rect" href="../index.html" class="plain"><span id="vlfeat">VLFeat</span><span id="dotorg">.org</span></a></h1>
  </div>
  <div id="headbanner">
   Documentation - C API
  </div>
  <div id="pagebody">
   <div id="sidebar"> <!-- Navigation Start -->
    <ul>
<li><a href="../index.html">Home</a>
</li>
<li><a href="../download.html">Download</a>
</li>
<li><a href="../doc.html">Documentation</a>
<ul>
<li><a href="../mdoc/mdoc.html">Matlab API</a>
</li>
<li><a href="index.html" class='active' >C API</a>
</li>
<li><a href="../man/man.html">Man pages</a>
</li>
</ul></li>
<li><a href="../overview/tut.html">Tutorials</a>
</li>
<li><a href="../applications/apps.html">Applications</a>
</li>
</ul>

   </div> <!-- sidebar -->
   <div id="content">
    
    <link rel="stylesheet" type="text/css" href="../doxygen.css"></style>
    <div class="doxygen">
<div>
<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">mser.c File Reference</div>  </div>
</div>
<div class="contents">

<p>MSER - Definition.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="mser_8h.html">mser.h</a>&quot;</code><br/>
<code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &lt;assert.h&gt;</code><br/>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mser_8c.html#aef2b52041a114960ba86e2b61791dc21">adv</a> (int ndims, int const *dims, int *subs)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Advance N-dimensional subscript.  <a href="#aef2b52041a114960ba86e2b61791dc21"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="host_8h.html#a5bd6e91d6bfd0be04101fdca94069c92">vl_uint</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mser_8c.html#a95199af3632f9d161217f7932dce9066">climb</a> (VlMserReg *r, <a class="el" href="host_8h.html#a5bd6e91d6bfd0be04101fdca94069c92">vl_uint</a> idx)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Climb the region forest to reach aa root.  <a href="#a95199af3632f9d161217f7932dce9066"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">VlMserFilt *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mser_8c.html#af6dbdcb894693e90c43d51140d17cb9c">vl_mser_new</a> (int ndims, int const *dims)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new MSER filter.  <a href="#af6dbdcb894693e90c43d51140d17cb9c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mser_8c.html#a3d94ff216cb9389b49dc5799e26ad3ba">vl_mser_delete</a> (VlMserFilt *f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete MSER filter.  <a href="#a3d94ff216cb9389b49dc5799e26ad3ba"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mser_8c.html#ae50c576bc27a1ee7837cbbe6e5089583">vl_mser_process</a> (VlMserFilt *f, <a class="el" href="mser_8h.html#a5f6872cfbb7787c2a38cc2d5f138c716">vl_mser_pix</a> const *im)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Process image.  <a href="#ae50c576bc27a1ee7837cbbe6e5089583"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mser_8c.html#aeeee08edd486e41126316f1d3bf90013">vl_mser_ell_fit</a> (VlMserFilt *f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Fit ellipsoids.  <a href="#aeeee08edd486e41126316f1d3bf90013"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><dl class="author"><dt><b>Author:</b></dt><dd>Andrea Vedaldi </dd></dl>
</div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="aef2b52041a114960ba86e2b61791dc21"></a><!-- doxytag: member="mser.c::adv" ref="aef2b52041a114960ba86e2b61791dc21" args="(int ndims, int const *dims, int *subs)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void adv </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ndims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int const *&#160;</td>
          <td class="paramname"><em>dims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>subs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The function increments by one the subscript <em>subs</em> indexing an array the <em>ndims</em> dimensions <em>dims</em>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">ndims</td><td>number of dimensions. </td></tr>
    <tr><td class="paramname">dims</td><td>dimensions. </td></tr>
    <tr><td class="paramname">subs</td><td>subscript to advance. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a95199af3632f9d161217f7932dce9066"></a><!-- doxytag: member="mser.c::climb" ref="a95199af3632f9d161217f7932dce9066" args="(VlMserReg *r, vl_uint idx)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="host_8h.html#a5bd6e91d6bfd0be04101fdca94069c92">vl_uint</a> climb </td>
          <td>(</td>
          <td class="paramtype">VlMserReg *&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="host_8h.html#a5bd6e91d6bfd0be04101fdca94069c92">vl_uint</a>&#160;</td>
          <td class="paramname"><em>idx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The function climbs the regions forest <em>r</em> starting from the node <em>idx</em> to the corresponding root.</p>
<p>To speed-up the operation, the function uses the VlMserReg::shortcut field to quickly jump to the root. After the root is reached, all the used shortcut are updated.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">r</td><td>regions' forest. </td></tr>
    <tr><td class="paramname">idx</td><td>stating node. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>index of the reached root. </dd></dl>

</div>
</div>
<a class="anchor" id="a3d94ff216cb9389b49dc5799e26ad3ba"></a><!-- doxytag: member="mser.c::vl_mser_delete" ref="a3d94ff216cb9389b49dc5799e26ad3ba" args="(VlMserFilt *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vl_mser_delete </td>
          <td>(</td>
          <td class="paramtype">VlMserFilt *&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The function releases the MSER filter <em>f</em> and all its resources.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>MSER filter to be deleted. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aeeee08edd486e41126316f1d3bf90013"></a><!-- doxytag: member="mser.c::vl_mser_ell_fit" ref="aeeee08edd486e41126316f1d3bf90013" args="(VlMserFilt *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vl_mser_ell_fit </td>
          <td>(</td>
          <td class="paramtype">VlMserFilt *&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>MSER filter.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="mser_8h.html#mser-ell">Ellipsoids</a> </dd></dl>

</div>
</div>
<a class="anchor" id="af6dbdcb894693e90c43d51140d17cb9c"></a><!-- doxytag: member="mser.c::vl_mser_new" ref="af6dbdcb894693e90c43d51140d17cb9c" args="(int ndims, int const *dims)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VlMserFilt* vl_mser_new </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ndims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int const *&#160;</td>
          <td class="paramname"><em>dims</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Initializes a new MSER filter for images of the specified dimensions. Images are <em>ndims</em> -dimensional arrays of dimensions <em>dims</em>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">ndims</td><td>number of dimensions. </td></tr>
    <tr><td class="paramname">dims</td><td>dimensions. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae50c576bc27a1ee7837cbbe6e5089583"></a><!-- doxytag: member="mser.c::vl_mser_process" ref="ae50c576bc27a1ee7837cbbe6e5089583" args="(VlMserFilt *f, vl_mser_pix const *im)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vl_mser_process </td>
          <td>(</td>
          <td class="paramtype">VlMserFilt *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="mser_8h.html#a5f6872cfbb7787c2a38cc2d5f138c716">vl_mser_pix</a> const *&#160;</td>
          <td class="paramname"><em>im</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The functions calculates the Maximally Stable Extremal Regions (MSERs) of image <em>im</em> using the MSER filter <em>f</em>.</p>
<p>The filter <em>f</em> must have been initialized to be compatible with the dimensions of <em>im</em>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>MSER filter. </td></tr>
    <tr><td class="paramname">im</td><td>image data. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>
     <!-- Doc Here -->
    </div>
   
   </div>
   <div class="clear">&nbsp;</div>
  </div> <!-- pagebody -->
  <div id="footer">
   &copy; 2007-12 Andrea Vedaldi and Brian Fulkerson
  </div> <!-- footer -->

  <!-- Google Analytics Begins -->
  <script xml:space="preserve" type="text/javascript">
   //<![CDATA[
    var localre = /vlfeat.org/;
    if(document.location.host.search(localre) != -1)
    {
   var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
   document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
   }
   //]]>
  </script>
  <script xml:space="preserve" type="text/javascript">
    //<![CDATA[
    var localre = /vlfeat.org/;
    if(document.location.host.search(localre) != -1)
    {

   try {
   var pageTracker = _gat._getTracker("UA-4936091-2");
   pageTracker._trackPageview();
   } catch(err) {}

   }
   //]]>
  </script>
  <!-- Google Analytics Ends -->
 </body>
</html>

 
